package com.dldata.devtools30.repository.api;


import com.dldata.devtools30.entity.DevtApiTjoptEntity;
import com.dldata.devtools30.repository.BaseRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by ai on 2017/1/11.
 */
@Repository
public interface DevtApiTjoptEntityDao extends BaseRepository<DevtApiTjoptEntity,String>, JpaSpecificationExecutor<DevtApiTjoptEntity> {
        @Query("select d from DevtApiTjoptEntity d where d.subid=?1 or subid in (select d.id from DevtApiSubEntity d where d.dm=?1 ) order by  d.xh")
        public List<DevtApiTjoptEntity> getAllDataByIdOrDm(String subid);

}
